package com.shrct.businessprocess.budget.impl;

import com.shrct.businessprocess.budget.RCCostBreakDown;
import com.shrct.businessprocess.budget.RCEX1Budget;
import com.shrct.businessprocess.budget.impl.RCEXBaseBudgetImpl;
import com.shrct.businessprocess.budget.proxy.RCEX1BudgetProxy;
import edu.fudan.mylang.pf.IObjectFactory;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

@Entity
@DiscriminatorValue("RCEX1BUDGET_TYPE")
public class RCEX1BudgetImpl extends RCEXBaseBudgetImpl implements RCEX1Budget {
  public RCEX1BudgetImpl() {
    super();
  }
  
  public RCEX1BudgetImpl(final RCCostBreakDown cbd) {
    super( cbd);
    
  }
  
  public String getTypeId() {
    return "RCEX1Budget";
  }
  
  public static RCEX1Budget create(final RCCostBreakDown cbd, final IObjectFactory objectFactory) {
    com.shrct.businessprocess.budget.RCEX1Budget rCEX1Budget = new com.shrct.businessprocess.budget.impl.RCEX1BudgetImpl(
    	cbd
    );
    objectFactory.create(rCEX1Budget);
    return rCEX1Budget;			
    
  }
  
  public static RCEX1Budget createRCEX1BudgetImpl(final RCCostBreakDown cbd, final IObjectFactory objectFactory, final Procedure1<RCEX1Budget> init) {
    com.shrct.businessprocess.budget.RCEX1Budget rCEX1Budget = new com.shrct.businessprocess.budget.impl.RCEX1BudgetImpl(
    	cbd
    );
    objectFactory.create(rCEX1Budget);
    init.apply(rCEX1Budget);
    
    return rCEX1Budget;			
    
  }
  
  public RCEX1BudgetProxy toProxy() {
    com.shrct.businessprocess.budget.proxy.RCEX1BudgetProxy proxy = new com.shrct.businessprocess.budget.proxy.RCEX1BudgetProxy();
    proxy.setId(this.getId());
    if(this instanceof edu.fudan.mylang.pf.INamedModelObject){
    	proxy.setName(((edu.fudan.mylang.pf.INamedModelObject)this).getEntityName());
    }
    return proxy;
    
  }
}
